package com.clarence.dada.core.redis.operator.type;


import com.clarence.dada.core.redis.constants.RedisConstants;
import com.clarence.dada.core.redis.operator.AbstractRedisCacheOperator;
import org.springframework.data.redis.core.RedisTemplate;

import java.util.List;

/**
 * 用户角色的redis缓存
 * <p>
 * key为userId，value是Long类型集合，为角色的集合
 *
 * @author fengshuonan
 * @since 2021/7/29 22:54
 */
public class UserRoleRedisCache extends AbstractRedisCacheOperator<List<Long>> {

    public UserRoleRedisCache(RedisTemplate<String, List<Long>> redisTemplate) {
        super(redisTemplate);
    }

    @Override
    public String getCommonKeyPrefix() {
        return RedisConstants.USER_ROLES_CACHE_PREFIX;
    }

}
